package com.dopios.services.webapp.utilities;

import com.dopios.services.persistance.domain.CityAdvice;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Guzzler
 * Date: 18/9/2013
 * Time: 11:20 μμ
 * To change this template use File | Settings | File Templates.
 */
public class Utilities {

    public static int retrieveExcludedUserId(List<CityAdvice> advices){
        int excludedId=-1;
        for(CityAdvice advice:advices){
            if(advice!=null && advice.getRating()!=null && advice.getRating().equals("1")){
             return Integer.parseInt(advice.getUserAddedId());
            }
        }
        return excludedId;
    }
}
